Create a normal array, not an array of 1x1 arrays
authorDebian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
Sat, 2 Mar 2019 14:59:35 +0000 (14:59 +0000)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Sat, 2 Mar 2019 14:59:35 +0000 (14:59 +0000)
Fixes "object arrays are not supported".

Author: Kevin "bashtage" Sheppard
Origin: upstream https://github.com/statsmodels/statsmodels/pull/4911/commits/18dcceefbfed61b0d11ae5884a9f4cea82c2edb5
Forwarded: not-needed

Gbp-Pq: Name unconstrain_stationary_multivariate.patch

statsmodels/tsa/statespace/tools.py

index 6c485e9228387b04cdea274c9a2d0845b9e87181..a97efce8f91d14c4be8e1875e3938639f78df67f 100644 (file)
@@ -965,7 +965,7 @@ def _compute_multivariate_acovf_from_coefficients(
     # Then stack the VAR(p) into a VAR(1) in companion matrix form:
     # z_{t+1} = F z_t + v_t
     companion = companion_matrix(
-        [1] + [-coefficients[i] for i in range(order)]
+        [1] + [-np.squeeze(coefficients[i]) for i in range(order)]
     ).T
 
     # Compute the error variance matrix for the stacked form: E v_t v_t'